home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2004 #6
/
Amiga Plus CD - 2004 - No. 06.iso
/
AmiSoft
/
Util
/
libs
/
ExtraLib.lha
/
Extra
/
Demos
/
StringDemo.BAS
< prev
next >
Wrap
BASIC Source File
|
2004-05-30
|
2KB
|
53 lines
' ___________________________________________________________________________
' |*************************************************************************|
' |*|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|*|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|*|
' |*| Set TAB to 4 for best readable file layout. |*| Maxon Basic 3.00 |*|
' |*|______________________________________________|*|____________________|*|
' |*************************************************************************|
' |*|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|*|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|*|
' |*| |*| $Id: StringDemo.BAS (07.10.03) |*|
' |*| ###### ###### |*| RhoSigma Source based on NDK 3.1 Includes 40.15 |*|
' |*| ## ## ## # |*| _________________________________________________ |*|
' |*| ## ## ## |*| |*|
' |*| ###### ## |*| Demo to show use of GETSTRING$-SUB in »extra.bc« |*|
' |*| ## ## |*| |*|
' |*| ## ## # |*| ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ |*|
' |*| ## ###### |*| Copyright © 1998-2002 RhoSigma, Roland Heyder |*|
' |*| |*| All Rights Reserved. |*|
' |*|_______________|*|___________________________________________________|*|
' |*************************************************************************|
' ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
'$TO StringDemoBAS
'$ICONS
'$NOLIBRARY
'$INCLUDE exec.bc
'$INCLUDE settings.bc
'$INCLUDE extra.bh
DATA "$VER: StringDemoBAS 4.215 (07.10.03)"
LIBRARY OPEN "extra",4
LINE INPUT "Bitte geben Sie eine Dezimal-Zahl ein: ";z$
z&=VAL(z$)
PRINT
b&=Int32ToString&(z&,TRUE&,2)
o&=Int32ToString&(z&,TRUE&,8)
h&=Int32ToString&(z&,TRUE&,16)
b$=GETSTRING$(b&)
o$=GETSTRING$(o&)
h$=GETSTRING$(h&)
PRINT "Die angegebene Zahl convertiert auf andere Zahlen-Basen:"
PRINT
PRINT " binär: ";b$
PRINT " octal: ";o$
PRINT "hexadezimal: ";h$
LIBRARY CLOSE
END